6. Embedded Programing

This week we worked on the implementation of programming protocols.

Description of the work process of the week06

Programming a circuit board involves several key steps and requires precise and meticulous work.

As for the previous preparation for programming my board, it began with downloading the necessary software in my case Arduino, but you can use something else like Python.

To download Arduino, I searched the Arduino IDE website and chose the first one that appeared, that's how I started, I opened the program and a sketch appeared, which is where I worked.

Once in the sketch, in the bar above look for tools and choose the board with which a Xiao rp2040 would work, which is the one I soldered in week 4, the port where I inserted the cable with which I connected and in the bar side install the necessary libraries to be able to code.

Since the previous steps went well, I started with the programming when the sketch was open, by default the system generates a base code with two voids.

  • VOID SETUP: A part of our code that is executed once.
  • VOID LOOP: Runs constantly.

And this is how I started writing my code so that my LEDs could turn on and off, first writing in VOID SETUP pinmode is how I notify my program that I am going to use it, open parentheses to place the parameters that will indicate if I am going to send or receive information and what pin, and in VOID LOOP I put what my pin meant, so we wrote digital writing, I opened parentheses and told it what I wanted it to do first, turn it on and off and how long the blinking lasts.

Once the code has been written, verify that it was correct by verifying, you can see this in the bar below, it marks with white letters that the code is correctly written, if it is with red letters, run! (just kidding), if it is in red letters it means that you wrote something wrong, but it tells you where and what you can correct.

Upon performing the previous step and realizing that my code was correct, I uploaded it to my PCB.

I did the same with other codes and experimented more with the program, I also took the opportunity to create the code that I could use in my final project and it worked.

reflection and analysis

The C ++ language has a somewhat complex syntax since you have to declare each of the variables, whether it is an integer or tenth or whether it is letters, but faster since it is independent. Inputs and outputs will always be in capital letters and since it is the C++ language, they always end in a semicolon.

Always remember to use the correct language!

Useful links

Evidence

Video